Skip to main content

arm

Table Name: arm

The arm table defines various arms or subgroups within a program. Each arm can be managed by specific users and is linked to a program for organizational purposes.


Columns

Column NameData TypeConstraintsDescription
armIdint(11)Primary Key, Auto IncrementA unique identifier for each arm.
armNamevarchar(255)NullableThe name of the arm, providing a descriptive label.
createdByUserIdint(11)Nullable, Foreign KeyLinks to the user table, indicating who created the arm.
lastEditedByUserIdint(11)Nullable, Foreign KeyLinks to the user table, indicating who last modified the arm.
programIdint(11)Not Null, Foreign KeyLinks to the program table, indicating the program to which this arm belongs.
reminderSMSAllowedtinyint(1)Not NullIndicates whether sending reminder SMS is allowed (1 for yes, 0 for no).
enrollmentLimitint(11)Not NullThe maximum number of enrollments allowed for this arm.

Indexes

  1. Primary Key: armId
    • Ensures each arm has a unique identifier.
  2. Foreign Key Indexes:
    • arm_lastEditedByUserId_user_mappedId_FK: Optimizes lookups for lastEditedByUserId.
    • arm_createdByUserId_user_mappedId_FK: Optimizes lookups for createdByUserId.
    • program_programId_arm_programId_FK_idx: Optimizes lookups for programId.

Foreign Key Relationships

  1. user table:
    • createdByUserId: Links to user(mappedId) to identify the user who created the arm.
    • lastEditedByUserId: Links to user(mappedId) to identify the user who last edited the arm.
  2. program table:
    • programId: Links to program(programId) to associate the arm with a specific program.

Usage Notes

  • Purpose:
    • The arm table organizes entities or participants into subgroups within a program.
    • Facilitates subgroup-specific configurations, such as enrollment limits and SMS reminders.
  • SMS Reminders:
    • The reminderSMSAllowed column governs whether participants in the arm can receive reminder SMS notifications.
  • Enrollment Limits:
    • The enrollmentLimit column ensures a controlled number of participants can be associated with an arm.
  • Management:
    • The table includes fields to track who created and last edited each arm for auditing and accountability.
  • Integration:
    • Heavily integrated with the program and user tables to maintain structured and hierarchical data relationships.